package com.suning.sawp.remote.dto;

import java.io.Serializable;

public class ResponseData<T> implements Serializable {
    
    /**
     */
    private static final long serialVersionUID = 8830726621110084227L;

    public static final String FAIL = "0";
    
    public static final String SUCCESS = "1";
    /**
     * 接口标示，0-失败；1-成功
     */
    private String retFlag;
    
    /**
     * 失败原因码
     */
    private String errorCode = "";
    
    /**
     * 失败原因描述
     */
    private String errorMessage = "";
    
    /**
     * 业务字段
     */
    private T data;

    public ResponseData() {
        this.retFlag = SUCCESS;
    }
    
    public String getRetFlag() {
        return retFlag;
    }

    public void setRetFlag(String retFlag) {
        this.retFlag = retFlag;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }

    public String getErrorMessage() {
        return errorMessage;
    }

    public void setErrorMessage(String errorMessage) {
        this.errorMessage = errorMessage;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "ResponseData [retFlag=" + retFlag + ", errorCode=" + errorCode + ", errorMessage=" + errorMessage
                + ", data=" + data + "]";
    }
    
}
